<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.lp.cfg.ProConfig" %>
<!DOCTYPE html>
<html>
<head>
	<%@ include  file="/WEB-INF/oss/base/common/variable.jsp"%>
    <%@ include  file="/WEB-INF/oss/base/common/resource_lib.jsp"%>
    <%@ include  file="/WEB-INF/oss/base/common/variable_js.jsp"%>
     <script type="text/javascript" src="<%=basePath%>/lib/webUploader/webuploader.min.js"></script>	 
	<style type="text/css">
		.self-base-icon{
			padding: 0 10px;
			font-size: 14px;
			cursor: pointer;
		}
		.self-base-icon:HOVER {
			color: #00aaee;
		}
		.span-name{
			display: inline-block;
			width: 70px;
			
		}
		.upload_card{
			margin-top: 10px;
			border: 1px solid #d9d9d9;
    		padding: 10px;
		}
		.webuploader-element-invisible{
			display: none !important;
		}
	</style>
</head>
<body>
	<div class="app-container">
		
		<div class="upload_card">
			<h3 style="font-size: 20px;">Wechat public menu update</h3> 
			<p style="margin: 5px;">Remark：Whether the file "config/weiixn.config.properties"  is correctly configured </p>
			<a href="<%=basePath%>/service/weixin/mp/menu/create" class="layui-btn layui-btn-normal">Wechat menu generation</a>
		</div>
		
		<div class="upload_card">
			<h3 style="font-size: 20px;">Landing page background image replacement</h3>
			<p style="margin: 5px;">Note: png format image </p>
			<div>
				<img style="width: 300px;" alt="" src="<%=basePath%>/image/oss/iot/login_back4.png">
			</div>
			<div style="margin-top: 10px;">
				<div class="upload_img mr10" id="upload_img_login"  style="display: inline-block;position: relative;width: 100px;">
		        	<button tag="" class="button ml10" style=""><span class="iconfont icon-upload"></span><span> </span>Upload base map</button>
				</div> 
			</div>
		</div>
		
		<div class="upload_card">
			<h3 style="font-size: 20px;">Home logo picture replacement</h3>
			<p style="margin: 5px;">Note: png format image 128*128 </p>
			<div>
				<img style="width: 100px;background: #e3e3e3;" alt="" src="<%=basePath%>/image/oss/iot/logo13.png" >
			</div>
			<div style="margin-top: 10px;">
				<div class="upload_img mr10" id="upload_img_logo"  style="display: inline-block;position: relative;width: 100px;">
		        	<button tag="" class="button ml10" style=""><span class="iconfont icon-upload"></span><span> </span>Upload base map</button>
				</div> 
			</div>
		</div>
		
		<div class="upload_card">
			<h3 style="font-size: 20px;">Browser ICO images</h3>
			<p style="margin: 5px;">Note: .ico format pictures 16*16 </p>
			<div>
				<img style="width: 100px;background: #e3e3e3;" alt="" src="<%=basePath%>/image/oss/iot/favicon2.ico" >
			</div>
			<div style="margin-top: 10px;">
				<div class="upload_img mr10" id="upload_brower_ico"  style="display: inline-block;position: relative;width: 100px;">
		        	<button tag="" class="button ml10" style=""><span class="iconfont icon-upload"></span><span> </span>Upload base map</button>
				</div> 
			</div>
		</div>
		
		<div class="upload_card">
			<h3 style="font-size: 20px;">Landing page QR code replacement</h3>
			<p style="margin: 5px;">Note: png format image 344*344 </p>
			<div>
				<img style="width: 100px;" alt="" src="<%=basePath%>/image/oss/iot/footer_all.png">
			</div>
			<div style="margin-top: 10px;">
				<div class="upload_img mr10" id="upload_img_login_qrcode"  style="display: inline-block;position: relative;width: 100px;">
		        	<button tag="" class="button ml10" style=""><span class="iconfont icon-upload"></span><span> </span>Upload base map</button>
				</div> 
			</div>
		</div>
	</div>
	
	
</body>
<script type="text/javascript">

$(function(){
	imgInit("upload_img_login","login_back4");
	imgInit("upload_img_logo","logo13");
	imgInit("upload_img_login_qrcode","footer_all");
	
	imgInit2("upload_brower_ico",{ "code": "favicon2" , "suffix":"ico"  });
})

function imgInit(id,code){
	//上传模板
	UploadInit( localUrl + '/sensor/ico/upload.json' , {"code":code} ,function(file,data){
		// 
		if(isOK(data)){
			alert("Upload successfully, due to the existence of cache, the picture will not be refreshed immediately, need to refresh the page several times, thank you!");
			window.location.reload();
		}
	}, id ,"","100px", "35px") ; 
}

function imgInit2( id , data ){
	//上传模板
	UploadInit( localUrl + '/sensor/ico/upload.json' , data  ,function(file,data){
		// 
		if(isOK(data)){
			alert("Upload successfully, due to the existence of cache, the picture will not be refreshed immediately, need to refresh the page several times, thank you!");
			window.location.reload();
		}
	}, id ,"","100px", "35px") ; 
}

</script>
</html>